module.exports = {
  apps: [
    {
      name: 'blog_service',
      script: './dist/main.js',
      watch: true,
      out_file: './logs/pm2log/out_log.log',
      error_file: './logs/pm2log/error_log.log',
      log_date_format: 'YYYY-MM-DD HH：mm：ss',
      ignore_watch: ['node_modules', 'logs', 'src'],
    },
  ],

  deploy: {
    production: {
      user: 'SSH_USERNAME',
      host: 'SSH_HOSTMACHINE',
      ref: 'origin/master',
      repo: 'GIT_REPOSITORY',
      path: 'DESTINATION_PATH',
      'pre-deploy-local': '',
      'post-deploy':
        'npm install && pm2 reload ecosystem.config.js --env production',
      'pre-setup': '',
    },
  },
}
